package com.cinema.service.impl;

import com.cinema.dao.FilmDao;
import com.cinema.dao.HallDao;
import com.cinema.entity.Film;
import com.cinema.entity.Hall;
import com.cinema.service.HallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class HallServiceImpl implements HallService {
    @Autowired
    private HallDao hallDao;
    @Autowired
    private FilmDao filmDao;
    @Override
    //通过电影id查询影厅信息
    public List<Hall> queryByFilmId(Integer filmId) {

        return hallDao.queryByFilmId(filmId);
    }

    @Override
    public Film queryFilmByHallId(Integer hallId) {
        return hallDao.queryFilmByHallId(hallId);
    }

    @Override
    public int queryHallId(int hallSerialNumber, Date hallFilmTime) {
        return hallDao.queryHallId(hallSerialNumber,hallFilmTime);
    }
}
